#ifndef XINDEXBUFFERD3D9
#define XINDEXBUFFERD3D9
#include "..\XModEngine\XIndexBuffer.h"
#include "XRenderD3D9.h"
#include "D3DInclude.h"

class XIndexBufferD3D9 : public XIndexBuffer{
private:
	IDirect3DIndexBuffer9* m_buffer;
	void* m_back_buffer;
	friend class XRenderD3D9;
public:
	XIndexBufferD3D9();
	~XIndexBufferD3D9();
	bool Init();
	string ToString();
	void SetIndexBuffer(XIndexBuffer* ptr_indexbuffer);
	void SetSourceBuffer(void* ptr_buffer, int i_offest, int i_size);
	void GetSourceBuffer(void** ptr_buffer);
	IDirect3DIndexBuffer9* GetBufferD3D();
	void SetBufferD3D(IDirect3DIndexBuffer9*);
};
#endif